# 代码所有：cxw
# 开发时间：2021/11/7 15:08
'''一个用于表示汽车的类'''
class Car():
    def __init__(self,make,model,year):
        self.making=make
        self.models=model
        self.years=year
        self.read_long=60
        '''描述汽车的种类，类型，生产日期'''
    def get_descriptive_name(self):
        print(self.years," ",self.making," ",self.models)
    '''打印汽车的里程'''
    def read_carlength(self):
        print("the car has",str(self.read_long))
        '''将里程设置程指定的值，拒绝里程表回拨'''
    def update_long(self,message):
        if message>=self.read_long:
            self.read_long=message
        else:
            print("you can not use it")
        '''将里程表读数添加指定的量'''
    def increment_odment(self,miles):
        self.read_long+=miles
# class Battery():
#     def __init__(self,battery_size=85):
#         self.battery=battery_size
#     def describe(self):
#         print("this has ",self.battery," battery!")
#     def battery_length(self):
#         if self.battery==70:
#             range=250
#         elif self.battery==85:
#             range=245
#         mm="this car can go on "+str(range)
#         mm+=" miles on a full charge."
#         print(mm)
# class Elec(Car):
#     def __init__(self,make,model,year):
#         super(Elec, self).__init__(make,model,year)
#         self.battery=Battery()

